package com.tfswue.jqr.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@Data
@TableName("tb_order")
public class Order {
    private Long id;
    private Long price;
    private String name;
    private Integer num;
    private Long userId;

    @TableField(exist = false)
    private String orderStatus;
    //  嵌入User对象，并标记为非表字段
    @TableField(exist = false)
    private User user;
}
/*
* {
*   id:101,
*   price:100,
*   name:'电脑',
*   num:1,
*   userId:1,
*   orderStatus:"待支付",
*   user:{
*     id:  1
*     username:'张三',
*     address:'北京'
*   }
* }
* */